<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Agregar un nuevo plato</title>
</head>
<style type="text/css">
    	body {font-family: Verdana; font-size: 10pt;}
    </style>
<f:view>
	<body>	
	<h:graphicImage value="/images/Pizza-75.png"/> 
    <h:graphicImage value="/images/webpizza.png"/> 
    <h:graphicImage value="/images/Pizza-75.png"/> 
	<h1> Agregar un nuevo plato de comida </h1>
	<hr />
	<h:form>
		<h:panelGrid columns="3" width="50%">
			<h:panelGroup><span class="label">Nombre Identificador:</span> 
			</h:panelGroup>
			<h:panelGroup><h:inputText id="name" value="#{Meal.name}" required="true"/>	
			</h:panelGroup>
			<h:panelGroup><h:message for="name"/>
			</h:panelGroup>
			<h:panelGroup><span class="label">T&iacute;tulo: </span>
			</h:panelGroup>
			<h:panelGroup><h:inputText id="title" value="#{Meal.title}" required="true" /> 
			</h:panelGroup>
			<h:panelGroup><h:message for="title"/>
			</h:panelGroup>
			<h:panelGroup><span class="label">Descripci&oacute;n : </span>
			</h:panelGroup>
			<h:panelGroup><h:inputTextarea id="description" value="#{Meal.description}"/>
			</h:panelGroup>
			<h:panelGroup><h:message for="description"/>
			</h:panelGroup>
			<h:panelGroup><span class="label">Precio :</span>
			</h:panelGroup>
			<h:panelGroup><h:inputText id="price" value="#{Meal.price}" required="true"/>
			</h:panelGroup>
			<h:panelGroup><h:message for="price"/>
			</h:panelGroup>
			<h:panelGroup><span class="label">URL de imagen :</span>
			</h:panelGroup>
			<h:panelGroup><h:inputText id="img_url" value="#{Meal.img_url}" required="false"/>
			</h:panelGroup>
			<h:panelGroup><h:message for="img_url"/>
			</h:panelGroup>
			<h:panelGroup><span class="label">Tipo de plato :  </span>
			</h:panelGroup>
			<h:panelGroup><h:inputText id="type" value="#{Meal.type}" required="true"/>
			</h:panelGroup>
			<h:panelGroup><h:message for="type"/>
			</h:panelGroup>
			<h:panelGroup><h:commandButton value="Agregar" action="#{Meal.add}"/>
			</h:panelGroup>
		</h:panelGrid>		
		</h:form>	
	</body>
</f:view>
</html>